#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QPoint>
#include "registerwindow.h"

QT_BEGIN_NAMESPACE
namespace Ui {
class MainWindow;
}
QT_END_NAMESPACE

class MainWindow : public QMainWindow
{
    Q_OBJECT

protected:
    void mousePressEvent(QMouseEvent *event) override;
    void mouseMoveEvent(QMouseEvent *event) override;
    void mouseReleaseEvent(QMouseEvent *event) override;
public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();
signals:
    void music();
private slots:
    void on_login_clicked();
    void on_zhuce_clicked();
    void on_stop_clicked();

    void on_readPass_checkStateChanged(const Qt::CheckState &arg1);

private:
    void readConfigJson();
    void initUI();
    void writefigJson(const QString key,const bool value);
    Ui::MainWindow *ui;
    QString m_userName= "";
    QString m_password = "";
    bool pull = false;       // 是否正在拖拽
    QPoint pulls;   //开始拖拽时鼠标的位置
};
#endif // MAINWINDOW_H
